import java.util.Scanner;

public class SJRLB {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        while(s.hasNext()) {
            String num = s.next();
            int n = Integer.parseInt(num.trim().equals("")?"0":num.trim());
            String[] strs = new String[n];
            for(int i = 0; i < n; i++) {
                strs[i] = s.nextLine();
            }
            StringBuilder sb = new StringBuilder();
            for(String str : strs) {
                if(str.contains(",")) {
                    sb.append("\"" +str +"\"" +",");
                }else {
                    sb.append(str +",");
                }
            }
            sb.delete(sb.length() - 1,sb.length());
            System.out.println(sb.toString());
        }
    }
}
